Optimal. Leaf size=84 \[ \frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2915, 12, 90,
212} \begin {gather*} \frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a \sin (c+d x)+a)}+\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 212
Rule 2915
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx &=\frac {a^5 \text {Subst}\left (\int \frac {x^3}{a^3 (a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \text {Subst}\left (\int \frac {x^3}{(a-x)^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \text {Subst}\left (\int \left (\frac {a}{4 (a-x)^3}-\frac {1}{2 (a-x)^2}-\frac {1}{8 (a+x)^2}+\frac {3}{8 \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{8 d}\\ &=\frac {3 a \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}-\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 84, normalized size = 1.00 \begin {gather*} \frac {a \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a \tan ^4(c+d x)}{4 d}-\frac {a \left (6 \sec ^3(c+d x) \tan (c+d x)-3 \left (\tanh ^{-1}(\sin (c+d x))+\sec (c+d x) \tan (c+d x)\right )\right )}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 98, normalized size = 1.17
method | result | size |
derivativedivides | \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+a \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(98\) |
default | \(\frac {\frac {a \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+a \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(98\) |
risch | \(\frac {i \left (-2 i a \,{\mathrm e}^{4 i \left (d x +c \right )}-2 a \,{\mathrm e}^{3 i \left (d x +c \right )}+2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+5 a \,{\mathrm e}^{5 i \left (d x +c \right )}+5 a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) | \(137\) |
norman | \(\frac {-\frac {3 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 86, normalized size = 1.02 \begin {gather*} \frac {3 \, a \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, a \sin \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3} - \sin \left (d x + c\right )^{2} - \sin \left (d x + c\right ) + 1}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 136, normalized size = 1.62 \begin {gather*} \frac {10 \, a \cos \left (d x + c\right )^{2} + 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - a \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, a \sin \left (d x + c\right ) - 6 \, a}{16 \, {\left (d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) - d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 90, normalized size = 1.07 \begin {gather*} \frac {6 \, a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - 6 \, a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a \sin \left (d x + c\right ) + a\right )}}{\sin \left (d x + c\right ) + 1} + \frac {9 \, a \sin \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right ) - 3 \, a}{{\left (\sin \left (d x + c\right ) - 1\right )}^{2}}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.46, size = 167, normalized size = 1.99 \begin {gather*} \frac {3\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {-\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}-\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________